package com.allwees.bs.c.module.order.repository;

import com.allwees.bs.c.module.base.repository.BaseRepository;
import com.allwees.bs.c.module.order.entity.OrderRefundItemEntity;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;
import java.util.Set;

public interface OrderRefundItemRepository extends BaseRepository<OrderRefundItemEntity, Integer> {
    @Query("SELECT o FROM OrderRefundItemEntity o WHERE o.orderRefundUuid in(:orderRefundUuids)")
    List<OrderRefundItemEntity> getByOrderRefundUuids(@Param("orderRefundUuids") Set<String> orderRefundUuids);

    OrderRefundItemEntity getByUuid(String uuid);

    List<OrderRefundItemEntity> findAllByUserUuid(String userUuid);

    List<OrderRefundItemEntity> findAllByOrderUuid(String orderUuid);
}
